﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MpSoft.Library.BUSS.Settings; 
namespace MpSoft.Web.AdminCP.Controls.Configs
{
    public partial class SetContact : System.Web.UI.UserControl
    {
        #region Method

        private void BindControl()
        {
            ckContent.Text = SettingBUSS.GetSettingValue("contact.content");
        }

        public int Save()
        {
            var contact = SettingBUSS.Setting_ByKey("contact.content");
            // contact
            contact.SettingValue = ckContent.Text;
            contact.SettingGroup = "contact";
            SettingBUSS.Setting_Update(contact);
            return 1;
        }

        #endregion

        #region Event

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
                BindControl();
        }

        #endregion
    }
}